<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
		<script src="jquery.validate.js"></script>
		<script type="text/javascript" src="jquery.metadata.js">
		
		</script>
		<script src="messages_cn.js"></script>
	</head>

	<body>
		<form id="affair_apply" method="post">
			<input name="0" class="form-control  carID {required:true,minlength:5,maxlength:5}" type="text" value="" required="required" placeholder="请输入车牌后五位，如12345">
			<button id="submit">点击</button>
		</form>
			<script type="text/javascript">
				function affair_validform() {
					return $("#affair_apply").validate({
						onfocusout: function(element) {
							$(element).valid();
						}
					})
				}
				$(affair_validform());
				$('#submit').click(function(){
					console.log(affair_validform().form())
				})
				
			</script>
	</body>

</html>